<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.hzqy.web.login.SessionKey"%>
<%@ page import="com.hzqy.web.vo.EpgInfoVo"%>
<%@ page import="com.hzqy.web.vo.PmsOrgVo" %>
<%@ page import="com.hzqy.web.vo.YxtAcountInfoVo" %>
<%@ page import="java.net.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>行业酒店校园平台放通页面</title>
</head>
<body>
<%
String platform = (String)session.getAttribute("platform");//平台 区分酒店和校园，行业
String current_partner = (String)session.getAttribute(SessionKey.SESSION_PARTNER_ID);
String pageUrl=String.valueOf(session.getAttribute(SessionKey.SESSION_EPG_URL));

String jumpEpgUrl="";
String jump_url="";
session.setAttribute(SessionKey.SESSION_PARTNER_ID,current_partner);//确保平台参数正确
PmsOrgVo orgVo=(PmsOrgVo)session.getAttribute(SessionKey.SESSION_USER_FOR_ORG_INFO);

try{
	if("hotel".equals(platform)){
		if("ZTE".equals(current_partner)||pageUrl.indexOf("/iptvepg/")>0){
			current_partner="ZTE";
			jumpEpgUrl="frame1032/portal.jsp";
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9);
		}else if("HW".equals(current_partner)||pageUrl.indexOf("/EPG/jsp/")>0){
			current_partner="HW";
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5);
			jumpEpgUrl="gdsdindustry/en/Category.jsp";
		}
	}else if("industry".equals(platform)){
		int flagGroup=0;//0 默认是500info，根据pageurl判断是500info还是gdgexinghua
		if(pageUrl.indexOf("ZJTELECOMG500info")>=0||pageUrl.indexOf("frame1041")>=0){
			flagGroup=0;//百视通
		}else if(pageUrl.indexOf("gdgexinghua")>=0||pageUrl.indexOf("frame1052")>=0){
			flagGroup=1;//广电
		}else if(pageUrl.indexOf("gdhdpublic")>=0||pageUrl.indexOf("frame1030")>=0){ 
			flagGroup=1;//广电分组进入 跳回广电
			if(orgVo!=null){
				orgVo.setF_po_type("hd");
			}
		}else if(pageUrl.indexOf("gdpublic")>=0||pageUrl.indexOf("frame1028")>=0){
			flagGroup=1;//广电分组进入 跳回广电
		}
		if("ZTE".equals(current_partner)||pageUrl.indexOf("/iptvepg/")>0){
			current_partner="ZTE";
			if(flagGroup==0){
				jumpEpgUrl="frame1043/portal.jsp";
			}else{
				jumpEpgUrl="frame1028/portal.jsp";
			}
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9);
			
		}else if("HW".equals(current_partner)||pageUrl.indexOf("/EPG/jsp/")>0){
			current_partner="HW";
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5);
			if(flagGroup==0){
				jumpEpgUrl="ZJTELECOMG500info/en/jumpTo.jsp?HWpublichz";
			}else{
				jumpEpgUrl="gdpublic/en/Category.jsp";
			}
		}
	}else{
		if("ZTE".equals(current_partner)||pageUrl.indexOf("/iptvepg/")>0){
			current_partner="ZTE";
			jumpEpgUrl="frame1028/portal.jsp";
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9);
		}else if("HW".equals(current_partner)||pageUrl.indexOf("/EPG/jsp/")>0){
			current_partner="HW";
			jump_url=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5);
			jumpEpgUrl="gdpublic/en/Category.jsp";
		}
	}
	jump_url=jump_url+jumpEpgUrl;
}catch(Exception e){
	System.out.println("commons/release.jsp_web_login,error");
	e.printStackTrace();
}
%>
</body>
<script type="text/javascript">
	try{//设置机顶盒模板光标样式
		var STB = navigator.appName;
		if(STB == "Ranger" || STB == "EIS iPanel"){//机顶盒浏览器区分 华为 创维
			iPanel.focusWidth = "3";//焦点框宽度
		}else if(STB == "ztebw" || STB == "Fhbw2.0"){//中兴 烽火
			iPanel.focusWidth = "3";//焦点框宽度
		}else{
			iPanel.focusWidth = "3";//焦点框宽度
		}
		iPanel.defaultalinkBgColor = "#FFFF00";//设置文字链接焦点颜色 
		iPanel.defaultFocusColor = "#FFFF00";//设置图片链接焦点颜色
	}catch(e){}
	
	window.onload=function(){
		var jump_url = "<%=jump_url %>";
		//console.log(jump_url);
		window.location.href = jump_url;
	}
</script>
</html>